<?php
//  抽象类 - 用于规定工厂所需要的方法

namespace Factory;

use Factory\Bicycle;
use Factory\Tesla;

class AmericaFactory extends FactoryMethod
{

    protected function createValue($type)
    {
        switch($type){
            case parent::CHEAP:
            return new Bicycle();
            break;
            case parent::FAST:
            return new Tesla();
            break;
        }
    }

}